/****** Object:  Table [dbo].[X_Config]    Script Date: 09/08/2009 21:46:09 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[X_Config]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[X_Config](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[ConfigKey] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ConfigValue] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
	[Remark] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_X_Config] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
/****** Object:  Table [dbo].[X_UserConfig]    Script Date: 09/08/2009 21:46:09 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[X_UserConfig]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[X_UserConfig](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [int] NOT NULL,
	[ConfigKey] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ConfigValue] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
	[Remark] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_X_UserConfig] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
/****** Object:  Table [dbo].[X_User]    Script Date: 09/08/2009 21:46:09 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[X_User]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[X_User](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Password] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Email] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[Enabled] [bit] NOT NULL,
	[Remark] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ModifiedOn] [datetime] NULL,
	[ModifiedBy] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_X_User] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
/****** Object:  Table [dbo].[X_Log]    Script Date: 09/08/2009 21:46:09 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[X_Log]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[X_Log](
	[LOGID] [int] IDENTITY(1,1) NOT NULL,
	[DATETIME] [datetime] NOT NULL,
	[THREAD] [varchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[LOG_LEVEL] [varchar](10) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[LOGGER] [varchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[MESSAGE] [varchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[EXCEPTION] [varchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_X_Log_1] PRIMARY KEY CLUSTERED 
(
	[LOGID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
/****** Object:  Table [dbo].[X_Menu]    Script Date: 09/08/2009 21:46:09 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[X_Menu]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[X_Menu](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Tooltip] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ImageUrl] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[NavigateUrl] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Show] [bit] NOT NULL,
	[Remark] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
	[ParentMenuId] [int] NOT NULL,
	[SortIndex] [int] NOT NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ModifiedOn] [datetime] NULL,
	[ModifiedBy] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_X_Menu] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END


